﻿<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Controls="clr-namespace:MSAP.Framework.Controls;assembly=MSAP.Framework.Controls"
	x:Class="XBAPSample.ShellPage"
    Title="xBapSample" ShowsNavigationUI="False">
	<Page.Resources>
		<Storyboard x:Key="LogoStoryBoard" AutoReverse="False" RepeatBehavior="Forever"/>
	</Page.Resources>
	<Page.Background>
        <ImageBrush ImageSource="/Themes/Fond/Fond.png" />
    </Page.Background>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition x:Name="rowDefinition_Banner" Height="Auto"/>
            <RowDefinition x:Name="rowDefinition_Menu" Height="*"/>
        </Grid.RowDefinitions>
        <Expander x:Name="expander_Banner" IsExpanded="True" ExpandDirection="Down" Grid.Row="0"
                      HorizontalAlignment="Stretch" VerticalAlignment="Stretch" MinHeight="6" Padding="10,5,10,0"
                      Style="{DynamicResource ExpanderStyle}" >
            <Grid>
                <Controls:RoundedBox Background="#00000000" />
                <DockPanel LastChildFill="True" Margin="2">

                    <Grid DockPanel.Dock="Left" Height="75" >
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition />
                        </Grid.RowDefinitions>
        			    <Ellipse Grid.Row="0" Grid.Column="0" Stroke="White" Width="141.3" RenderTransformOrigin="0.5,0.5" Opacity="0.59" StrokeThickness="0" Height="65">
        				    <Ellipse.RenderTransform>
        					    <TransformGroup>
        						    <RotateTransform Angle="-13.437"/>
        					    </TransformGroup>
        				    </Ellipse.RenderTransform>
        				    <Ellipse.Fill>
        					    <RadialGradientBrush>
        						    <GradientStop Color="White"/>
        						    <GradientStop Color="White" Offset="1"/>
        						    <GradientStop Color="#FFE3E7F2"/>
        					    </RadialGradientBrush>
        				    </Ellipse.Fill>
        			    </Ellipse>
                        <TextBlock Text="xbapSample" Grid.Row="0" Grid.Column="0" TextWrapping="Wrap" Margin="27.967,20.632,0,0" FontFamily="Arial" FontSize="18" Foreground="#FF067BC2" FontWeight="Bold" VerticalAlignment="Top" HorizontalAlignment="Left"/>
        			</Grid>

                    <Grid DockPanel.Dock="Right" Height="75" >
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        <Ellipse Grid.Row="0" Grid.Column="0" Stroke="White" Width="141.3" RenderTransformOrigin="0.5,0.5" Opacity="0.59" StrokeThickness="0" Height="65">
                            <Ellipse.RenderTransform>
                                <TransformGroup>
                                    <RotateTransform Angle="190"/>
                                </TransformGroup>
                            </Ellipse.RenderTransform>
                            <Ellipse.Fill>
                                <RadialGradientBrush>
                                    <GradientStop Color="White"/>
                                    <GradientStop Color="White" Offset="1"/>
                                    <GradientStop Color="#FFE3E7F2"/>
                                </RadialGradientBrush>
                            </Ellipse.Fill>
                        </Ellipse>
                        <TextBlock Text="MSAP" TextWrapping="Wrap" Margin="32.867,20.632,57.16,33.671" FontFamily="Arial" FontSize="18" Foreground="#FF067BC2" FontWeight="Bold" />
                    </Grid>

                    <Grid VerticalAlignment="Top" Height="75">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        
                        <TextBlock x:Name="tbkLogin" Grid.Row="0" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Center"/>

                        <Button HorizontalAlignment="Left" x:Name="RefreshConnexion" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" Click="RefreshConnexion_Click" ToolTip="Retenter la connexion" Visibility="Collapsed" OverridesDefaultStyle="True" Margin="0" Height="24" MinWidth="23">
                            <Button.Template>
                                <ControlTemplate>
                                    <Image Source="./Themes/Button/Refresh.png" Width="23" Height="24"/>
                                </ControlTemplate>
                            </Button.Template>
                        </Button>
                        <TextBlock x:Name="tbxRole" Text="Administrateur" Grid.Row="1"  Grid.Column="0" VerticalAlignment="Center"/>
                        <Button x:Name="btnLogout"  Grid.Row="2"  Grid.Column="0" Template="{DynamicResource LogoutButton}" OverridesDefaultStyle="True" Margin="0" VerticalAlignment="Center"/>
                        <TextBlock Text="Sample application for MSAP" Grid.Row="0"  Grid.Column="1" VerticalAlignment="Center"/>
                        <TextBlock Text="XBAP" Grid.Row="1"  Grid.Column="1" VerticalAlignment="Center"/>
                        <StackPanel Grid.Row="2"  Grid.Column="1" Orientation="Horizontal">
                            <Button x:Name="btnHelp" OverridesDefaultStyle="True" MinWidth="14" Margin="0,0,10,0">
                                <Button.Template>
                                    <ControlTemplate>
                                        <Image Source="./Themes/Button/Aide.png" Width="14" Height="14"/>
                                    </ControlTemplate>
                                </Button.Template>
                            </Button>
                            <TextBlock VerticalAlignment="Center"><Hyperlink NavigateUri="http://help/docs"><Run Text="Aide"/></Hyperlink></TextBlock>

                        </StackPanel>
                    </Grid>
                </DockPanel>
                
            </Grid>
        </Expander>

        <DockPanel LastChildFill="True" Grid.Row="1" x:Name="ShellDock" IsEnabled="{Binding IsEnabled}">
            <StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal" Height="35" MinWidth="1024">
                <Menu x:Name="MainMenu" />
            </StackPanel>
            <Controls:AnimatedTabControl
                x:Name="tabControl"
                VerticalAlignment="Stretch" IsSynchronizedWithCurrentItem="True"
                AutomationProperties.AutomationId="PositionSummaryTab" />
        </DockPanel>
        
    </Grid>
</Page>
